package com.hb.game.pk.ui.activity.game;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.hb.game.pk.R;
import com.hb.game.pk.base.BaseActivity;
import com.hb.game.pk.widgets.titlebar.TitleBar;

import butterknife.BindView;

public class GameRuleActivity extends BaseActivity {
    @BindView(R.id.title_bar)
    TitleBar titleBar;
    @BindView(R.id.iv_rule_sl)
    ImageView ivRuleSl;
    @BindView(R.id.ll_rule_jl)
    LinearLayout llRuleJl;
    @BindView(R.id.ll_rule_dx)
    LinearLayout llRuleDx;
    @BindView(R.id.ll_erba)
    LinearLayout llErba;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_game_rule;
    }

    @Override
    protected int getRootViewId() {
        return R.id.layout_root;
    }

    @Override
    protected int getRefreshId() {
        return 0;
    }

    @Override
    protected int getListViewId() {
        return 0;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        super.initView(savedInstanceState);
        Intent intent = getIntent();
        String type = intent.getStringExtra("type");
        if ("saolei".equals(type)) {
            ivRuleSl.setVisibility(View.VISIBLE);
        } else if ("jielong".equals(type)) {
            llRuleJl.setVisibility(View.VISIBLE);
        } else if ("erba".equals(type)) {
            llErba.setVisibility(View.VISIBLE);
        } else {
            llRuleDx.setVisibility(View.VISIBLE);
        }
        if ("saoleity".equals(type)) {
            ivRuleSl.setVisibility(View.VISIBLE);
        }
        titleBar.getLlLeft().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                GameRuleActivity.this.finish();
            }
        });
    }
}
